<template>
    <view class="box">
        <!-- <u-navbar title="阀贸通" placeholder autoBack border></u-navbar> -->
        <u-form v-if="false">
            <view class="title flex flex-ai-c">
                <view></view>
                <text>店铺资料</text>
            </view>
            <view class="list">
                <view class="item flex flex-ai-c">
                    <text>企业名称</text>
                    <text>{{ form.companyName }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>负责人</text>
                    <text>{{ form.domainUserName }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>联系方式</text>
                    <text>{{ form.phone }}</text>
                </view>
            </view>
            <view class="title flex flex-ai-c">
                <view></view>
                <text>公司介绍</text>
            </view>
            <view class="list text-box">
                {{ form.sroreDesc }}
            </view>
            <view class="title flex flex-ai-c">
                <view></view>
                <text>主营产品</text>
            </view>
            <view class="list text-box">
                {{ form.mainProducts }}
            </view>
            <view class="title flex flex-ai-c">
                <view></view>
                <text>其它资料</text>
            </view>
            <view class="list">
                <view class="item flex flex-ai-c">
                    <text>企业性质</text>
                    <text>{{ form.companyType }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>工商注册号</text>
                    <text>{{ form.companyNo }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>注册资金</text>
                    <text>{{ form.registerMoney }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>成立时间</text>
                    <text>{{ form.registerDate }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>公司所在地</text>
                    <text>{{ form.province + form.city + form.region }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>主要经营地</text>
                    <text>{{ form.address }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>经营品牌</text>
                    <text>{{ form.brand }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>员工人数</text>
                    <text>{{ form.employCount }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>年营业额</text>
                    <text>{{ form.turnover }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>开户银行</text>
                    <text>{{ form.companyBank }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>银行账号</text>
                    <text>{{ form.companyBankNo }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>是否提供对外加工/定制服务</text>
                    <text>{{ form.externalService }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>工厂面积</text>
                    <text>{{ form.companyArea }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>管理体系认证</text>
                    <text>{{ form.managerSys }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>产品质量认证</text>
                    <text>{{ form.mainProducts }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>质量控制</text>
                    <text>{{ form.qualityControl }}</text>
                </view>
            </view>
            <view class="title flex flex-ai-c">
                <view></view>
                <text>联系我们</text>
            </view>
            <view class="list">
                <view class="item flex flex-ai-c">
                    <text>联系人</text>
                    <text>{{ form.contactPerson }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>电话</text>
                    <text>{{ form.contactPhone }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>传真</text>
                    <text>{{ form.facsimile }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>邮箱</text>
                    <text>{{ form.email }}</text>
                </view>
                <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>地址</text>
                    <text>{{ form.addressform }}</text>
                </view>
                <!-- <view class="line"></view>
                <view class="item flex flex-ai-c">
                    <text>公司网站</text>
                    <text>{{ form.mainProducts }}</text>
                </view> -->
            </view>
        </u-form>

        <u-form :model="form" :rules="rules" ref="Form" :errorType="errorType">

            <view class="title flex flex-ai-c">
                <view></view>
                <text>店铺资料</text>
            </view>
            <view class="list">
                <u-form-item label="店铺名称" prop="storeName" label-width="200rpx">
                    <u-input v-model="form.storeName" placeholder="请输入店铺名称" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="企业名称" prop="companyName" label-width="200rpx">
                    <u-input v-model="form.companyName" placeholder="请输入企业名称" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="负责人" prop="domainUserName" label-width="200rpx">
                    <u-input v-model="form.domainUserName" placeholder="请输入负责人" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="联系方式" prop="phone" label-width="200rpx">
                    <u-input v-model="form.phone" placeholder="请输入联系方式" type="text" :disabled="code == 200" />
                </u-form-item>
            </view>
            <view class="title flex flex-ai-c">
                <view></view>
                <text>公司介绍</text>
            </view>
            <view class="list text-box">
                <u-form-item prop="sroreDesc">
                    <u-input type="textarea" placeholder="请输入公司介绍" v-model="form.sroreDesc" height="200"
                        :disabled="code == 200" />
                </u-form-item>
            </view>
            <view class="title flex flex-ai-c">
                <view></view>
                <text>主营产品</text>
            </view>
            <view class="list text-box">
                <u-form-item prop="mainProducts">
                    <u-input type="textarea" placeholder="请输入主营产品" v-model="form.mainProducts" height="200"
                        :disabled="code == 200" />
                </u-form-item>
            </view>
            <view class="title flex flex-ai-c">
                <view></view>
                <text>其它资料</text>
            </view>
            <view class="list">
                <u-form-item label="企业性质" prop="companyType" label-width="200rpx">
                    <u-input type="select" :select-open="companyTypeShow" v-model="form.companyType" placeholder="请选择企业性质"
                        @click="companyTypeClick()" :disabled="code == 200"></u-input>
                </u-form-item>
                <u-form-item label="工商注册号" prop="companyNo" label-width="200rpx">
                    <u-input v-model="form.companyNo" placeholder="请输入工商注册号" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="注册资金(万元)" prop="registerMoney" label-width="200rpx">
                    <u-input v-model="form.registerMoney" placeholder="请输入注册资金" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="注册时间" prop="registerDate" label-width="200rpx">
                    <!-- <u-input v-model="form.registerDate" placeholder="请输入注册资金" type="text" :disabled="code == 200" /> -->
                    <u-input type="select" :select-open="registerDateShow" v-model="form.registerDate" placeholder="请选择注册时间"
                        @click="registerDateClick()" :disabled="code == 200"></u-input>
                </u-form-item>
                <u-form-item label="公司所在地" prop="area" label-width="200rpx">
                    <u-input type="select" :select-open="pickerShow" v-model="form.area" placeholder="请选择省/市/区"
                        @click="pickerClick()" :disabled="code == 200"></u-input>
                </u-form-item>
                <u-form-item label="主要经营地" prop="address" label-width="200rpx">
                    <u-input v-model="form.address" placeholder="请输入主要经营地" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="经营品牌" prop="brand" label-width="200rpx">
                    <u-input v-model="form.brand" placeholder="请输入经营品牌" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="员工数" prop="employCount" label-width="200rpx">
                    <u-input v-model="form.employCount" placeholder="请输入员工数" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="年营业额(万元)" prop="turnover" label-width="200rpx">
                    <u-input v-model="form.turnover" placeholder="请输入年营业额" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="开户银行" prop="companyBank" label-width="200rpx">
                    <u-input v-model="form.companyBank" placeholder="请输入开户银行" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="银行账号" prop="companyBankNo" label-width="200rpx">
                    <u-input v-model="form.companyBankNo" placeholder="请输入银行账号" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="是否提供对外加工/定制服务" prop="externalServiceLabel" label-width="200rpx">
                    <u-input type="select" :select-open="companyTypeShow" v-model="form.externalServiceLabel"
                        placeholder="请选择" @click="externalServiceClick()" :disabled="code == 200"></u-input>
                </u-form-item>
                <u-form-item label="工厂面积(㎡)" prop="companyArea" label-width="200rpx">
                    <u-input v-model="form.companyArea" placeholder="请输入工厂面积" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="管理体系认证" prop="managerSys" label-width="200rpx">
                    <u-input v-model="form.managerSys" placeholder="请输入管理体系认证" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="产品质量认证" prop="productQuality" label-width="200rpx">
                    <u-input v-model="form.productQuality" placeholder="请输入产品质量认证" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="质量控制" prop="qualityControlLabel" label-width="200rpx">
                    <u-input type="select" :select-open="companyTypeShow" v-model="form.qualityControlLabel"
                        placeholder="请选择" @click="qualityControlClick()" :disabled="code == 200"></u-input>
                </u-form-item>
            </view>
            <view class="title flex flex-ai-c">
                <view></view>
                <text>联系我们</text>
            </view>
            <view class="list">
                <u-form-item label="联系人" prop="contactPerson" label-width="200rpx">
                    <u-input v-model="form.contactPerson" placeholder="请输入联系人" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="电话" prop="contactPhone" label-width="200rpx">
                    <u-input v-model="form.contactPhone" placeholder="请输入电话" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="移动电话" prop="contactPhone2" label-width="200rpx">
                    <u-input v-model="form.contactPhone2" placeholder="请输入移动电话" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="传真" prop="facsimile" label-width="200rpx">
                    <u-input v-model="form.facsimile" placeholder="请输入传真" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="邮箱" prop="email" label-width="200rpx">
                    <u-input v-model="form.email" placeholder="请输入邮箱" type="text" :disabled="code == 200" />
                </u-form-item>
                <u-form-item label="地址" prop="addressInfo" label-width="200rpx">
                    <u-input v-model="form.addressInfo" placeholder="请输入地址" type="text" :disabled="code == 200" />
                </u-form-item>
                <!-- <u-form-item label="公司网站" prop="addressInfo" label-width="200rpx">
                    <u-input v-model="form.addressInfo" placeholder="请输入公司网站" type="text" :disabled="code == 200" />
                </u-form-item> -->
            </view>
            <view class="title flex flex-ai-c">
                <view></view>
                <text>店铺logo上传*</text>
            </view>
            <u-upload ref="uUpload" prop="addressInfo" :action="action" :auto-upload="autoUpload" :file-list="fileList"
                :show-progress="showProgress" :deletable="deletable" :max-count="maxCount" :before-upload="beforeUpload"
                @on-success="onSuccess" v-if="code != 200">
            </u-upload>
            <image :src="'https://famen-img.oss-cn-beijing.aliyuncs.com/'+form.companyLogo" mode="scaleToFill" v-if="code == 200" style="width: 200rpx; height: 200rpx;" />
            <view class="title flex flex-ai-c">
                <view></view>
                <text>轮播图</text>
            </view>
            <u-upload ref="uUpload" :action="action" :auto-upload="autoUpload" :file-list="fileListIndexImg1"
                :show-progress="showProgress" :deletable="deletable" max-count="3" :before-upload="beforeUpload"
                @on-success="onSuccessIndexImg1"  v-if="code != 200">
            </u-upload>
            <view v-if="code == 200" >
                <image :src="'https://famen-img.oss-cn-beijing.aliyuncs.com/'+form.indexImg1" mode="scaleToFill" v-if="form.indexImg1" style="width: 200rpx; height: 200rpx; margin-right: 40rpx;" />
                <image :src="'https://famen-img.oss-cn-beijing.aliyuncs.com/'+form.indexImg2" mode="scaleToFill" v-if="form.indexImg2" style="width: 200rpx; height: 200rpx; margin-right: 40rpx;" />
                <image :src="'https://famen-img.oss-cn-beijing.aliyuncs.com/'+form.indexImg3" mode="scaleToFill" v-if="form.indexImg3" style="width: 200rpx; height: 200rpx;" />
            </view>
        </u-form>
        <button class="btn" @click="Submit()" v-if="code != 200">确认上传</button>

        <u-picker mode="region" v-model="pickerShow" @confirm="regionConfirm"></u-picker>
        <u-select mode="single-column" :list="companyTypeList" v-model="companyTypeShow"
            @confirm="companyTypeConfirm"></u-select>
        <u-select mode="single-column" :list="externalServiceList" v-model="externalServiceShow"
            @confirm="externalServiceConfirm"></u-select>
        <u-select mode="single-column" :list="qualityControlList" v-model="qualityControlShow"
            @confirm="qualityControlConfirm"></u-select>
        <u-calendar v-model="registerDateShow" ref="calendar" @change="registerDatechange" :mode="mode"
            :active-bg-color="activeBgColor">
        </u-calendar>
    </view>
</template>

<script>
export default {
    data() {
        return {
            userId: 440,
            code: '',
            // 提示模式
            errorType: ['message'],
            // 上拉省市区
            pickerShow: false,
            // 表单数据
            // 表单数据
            form: {
                companyType: '',
            },
            rules: {
                storeName: [{
                    required: true,
                    message: '请输入店铺名称',
                    trigger: ['change', 'blur'],
                }],
                companyName: [{
                    required: true,
                    message: '请输入企业名称',
                    trigger: ['change', 'blur'],
                }],
                domainUserName: [{
                    required: true,
                    message: '请输入负责人',
                    trigger: ['change', 'blur'],
                }],
                phone: [{
                    required: true,
                    message: '请输入手机号',
                    trigger: ['change', 'blur'],
                },
                {
                    validator: (rule, value, callback) => {
                        // 调用uView自带的js验证规则，详见：https://www.uviewui.com/js/test.html
                        return this.$u.test.mobile(value);
                    },
                    message: '手机号码不正确',
                    // 触发器可以同时用blur和change，二者之间用英文逗号隔开
                    trigger: ['change', 'blur'],
                }
                ],
                sroreDesc: [{
                    required: true,
                    message: '请输入公司介绍',
                    trigger: 'change',
                }],
                mainProducts: [{
                    required: true,
                    message: '请输入主营产品',
                    trigger: 'change',
                }],
                companyType: [{
                    required: true,
                    message: '请选择企业性质',
                    trigger: 'change',
                }],
                companyNo: [{
                    required: true,
                    message: '请输入工商注册号',
                    trigger: 'change',
                }],
                registerMoney: [{
                    required: true,
                    message: '请输入注册资金',
                    trigger: 'change',
                }],
                registerDate: [{
                    required: true,
                    message: '请输入注册时间',
                    trigger: 'change',
                }],
                area: [{
                    required: true,
                    message: '请选择地区',
                    trigger: 'change',
                }],
                address: [{
                    required: true,
                    message: '请输入详细地址',
                    trigger: ['change', 'blur'],
                }],
                brand: [{
                    required: true,
                    message: '请输入经营品牌',
                    trigger: ['change', 'blur'],
                }],
                employCount: [{
                    required: true,
                    message: '请输入员工数',
                    trigger: ['change', 'blur'],
                }],
                turnover: [{
                    required: true,
                    message: '请输入年营业额',
                    trigger: ['change', 'blur'],
                }],
                companyBank: [{
                    required: true,
                    message: '请输入开户银行',
                    trigger: ['change', 'blur'],
                }],
                companyBankNo: [{
                    required: true,
                    message: '请输入银行账号',
                    trigger: ['change', 'blur'],
                }],
                externalServiceLabel: [{
                    required: true,
                    message: '请选择',
                    trigger: ['change', 'blur'],
                }],
                qualityControlLabel: [{
                    required: true,
                    message: '请选择',
                    trigger: ['change', 'blur'],
                }],
                companyArea: [{
                    required: true,
                    message: '请输入工厂面积',
                    trigger: ['change', 'blur'],
                }],
                managerSys: [{
                    required: true,
                    message: '请输入管理体系认证',
                    trigger: ['change', 'blur'],
                }],
                productQuality: [{
                    required: true,
                    message: ' 请输入产品质量认证',
                    trigger: ['change', 'blur'],
                }],
                contactPerson: [{
                    required: true,
                    message: ' 请输入联系人',
                    trigger: ['change', 'blur'],
                }],
                contactPhone: [{
                    required: true,
                    message: ' 请输入电话',
                    trigger: ['change', 'blur'],
                }],
                contactPhone2: [{
                    required: true,
                    message: ' 请输入移动电话',
                    trigger: ['change', 'blur'],
                }],
                facsimile: [{
                    required: true,
                    message: ' 请输入传真',
                    trigger: ['change', 'blur'],
                }],
                email: [{
                    required: true,
                    message: ' 请输入邮箱',
                    trigger: ['change', 'blur'],
                }],
                addressInfo: [{
                    required: true,
                    message: ' 请输入地址',
                    trigger: ['change', 'blur'],
                }],
            },
            // 企业性质
            companyTypeList: [{
                value: '国有企业',
                label: '国有企业'
            },
            {
                value: '集体所有制',
                label: '集体所有制'
            },
            {
                value: '私营企业',
                label: '私营企业'
            },
            {
                value: '有限责任公司',
                label: '有限责任公司'
            },
            {
                value: '股份有限公司',
                label: '股份有限公司'
            },
            {
                value: '有限合伙企业联营企业',
                label: '有限合伙企业联营企业'
            },
            {
                value: '外商投资企业',
                label: '外商投资企业'
            },
            {
                value: '个人独资企业',
                label: '个人独资企业'
            }],
            companyTypeShow: false,
            // 注册时间
            registerDateShow: false,
            mode: 'date',
            activeBgColor: '#2979ff',
            // 是否对外服务
            externalServiceList: [{
                value: '0',
                label: '否'
            },
            {
                value: '1',
                label: '是'
            }],
            externalServiceShow: false,
            // 质量控制
            qualityControlList: [{
                value: '0',
                label: '内部'
            },
            {
                value: '1',
                label: '外部'
            }],
            qualityControlShow: false,
            // 上次地址
            action: uni.baseUrl + '/famenApi/system/upload/img',
            // 是否自动上传
            autoUpload: true,
            // 预置上传列表
            fileList: [],
            fileListIndexImg1: [],
            // 进度条和删除按钮
            showProgress: true,
            // 是否显示删除图片的按钮
            deletable: true,
            // 最大选择图片的数量
            maxCount: 1,
        }
    },
    onLoad() {
        this.getStoreInfo()
    },
    onReady() {
        this.$refs.Form.setRules(this.rules);
    },
    methods: {
        // 获取店铺信息
        getStoreInfo() {
            uni.showLoading({
                title: '加载中...',
                mask: true,
            });
            // 获取店铺信息
            let params = {
                "userId": this.userId
            }
            uni.$req.post('/famenApi/system/info/storeInfoForExternal', params).then(res => {
                uni.hideLoading();
                if (res.code == 200) {
                    this.form = res.data;
                    this.form.area = res.data.province + '-' + res.data.city + '-' + res.data.region;
                    // 判断是否对外服务
                    if (this.form.externalService == 1) {
                        this.form.externalServiceLabel = "是"
                    } else if (this.form.externalService == 0) {
                        this.form.externalServiceLabel = "否"
                    }
                    // 质量控制
                    if (this.form.qualityControl == 0) {
                        this.form.qualityControlLabel = "内部"
                    } else if (this.form.qualityControl == 1) {
                        this.form.qualityControlLabel = "外部"
                    }

                }
                this.code = res.code
            });
        },
        // 确认上传
        Submit() {
            this.form.userId = this.userId
            console.log(this.form);
            this.$refs.Form.validate(valid => {
                if (valid) {
                    if (this.form.companyLogo) {
                        if (this.form.indexImg1) {
                            uni.showLoading({
                                title: '加载中...',
                                mask: true,
                            });
                            uni.$req.post('/famenApi/system/info/addForExternal', this.form).then(res => {
                                uni.hideLoading();
                                if (res.code == 200) {
                                    uni.showToast({
                                        title: '提交成功',
                                        icon: 'none'
                                    })
                                    uni.navigateBack({
                                        delta: 1
                                    })
                                } else {
                                    uni.showToast({
                                        title: res.msg,
                                        icon: 'none'
                                    })
                                }
                                this.code = res.code
                            });
                        } else {
                            uni.showToast({
                                title: '请上传至少一种轮播图',
                                icon: 'none'
                            })
                        }
                    } else {
                        uni.showToast({
                            title: '请上传店铺logo',
                            icon: 'none'
                        })
                    }
                } else {
                    console.log('验证失败');
                }
            });
        },
        // 打开选择地区回调选择框
        pickerClick() {
            if (this.code !== 200) {
                this.pickerShow = true
            }
        },
        // 选择地区回调
        regionConfirm(e) {
            this.form.area = e.province.label + '-' + e.city.label + '-' + e.area.label;
            this.form.province = e.province.label;
            this.form.city = e.city.label;
            this.form.region = e.area.label;
        },
        // 打开企业性质选择框
        companyTypeClick() {
            if (this.code !== 200) {
                this.companyTypeShow = true
            }
        },
        // 选择企业性质回调
        companyTypeConfirm(e) {
            this.form.companyType = '';
            e.map((val, index) => {
                this.form.companyType += this.form.companyType == '' ? val.label : '-' + val.label;
            })
        },
        // 打开注册时间选择框
        registerDateClick() {
            if (this.code !== 200) {
                this.registerDateShow = true
            }
        },
        // 选择注册时间回调
        registerDatechange(e) {
            if (this.mode == 'range') {
                this.result = e.startDate + " - " + e.endDate;
            } else {
                this.form.registerDate = e.result;
            }
        },
        // 打开外部服务选择框
        externalServiceClick() {
            if (this.code !== 200) {
                this.externalServiceShow = true
            }
        },
        // 选择外部服务回调
        externalServiceConfirm(e) {
            this.form.externalService = '';
            this.form.externalServiceLabel = '';
            e.map((val, index) => {
                this.form.externalServiceLabel += this.form.externalServiceLabel == '' ? val.label : '-' + val.label;
                this.form.externalService += this.form.externalService == '' ? val.value : '-' + val.value;
            })
        },
        // 质量控制选择框
        qualityControlClick() {
            if (this.code !== 200) {
                this.qualityControlShow = true
            }
        },
        // 选择质量控制回调
        qualityControlConfirm(e) {
            this.form.qualityControl = '';
            this.form.qualityControlLabel = '';
            e.map((val, index) => {
                this.form.qualityControlLabel += this.form.qualityControlLabel == '' ? val.label : '-' + val.label;
                this.form.qualityControl += this.form.qualityControl == '' ? val.value : '-' + val.value;
            })
        },
        // 上传前的回调
        beforeUpload(index, list) {
            // 判断是否超出最大选择图片的数量
            //    console.log(index, list);
        },
        // 上传成功的回调
        onSuccess(list, index) {
            // console.log('上传成功的回调', index, list);
            this.form.companyLogo = list.data.picPath
        },
        onSuccessIndexImg1(list, index) {
            console.log('上传成功的回调', index, list);
            if(index == 0){
                this.form.indexImg1 = list.data.picPath
            }else if(index == 1){
                this.form.indexImg2 = list.data.picPath
            }else if(index == 2){
                this.form.indexImg3 = list.data.picPath
            }
           
        },
    }
}
</script>

<style lang="scss" scoped>
.box {
    padding: 0 20rpx 20rpx;
}

.title {
    margin-bottom: 30rpx;
    margin-top: 45rpx;

    view {
        width: 11rpx;
        height: 41rpx;
        background: #0059B9;
        border-radius: 8rpx;
        margin-right: 10rpx;
    }

    text {
        font-family: SimHei;
        font-weight: 600;
        font-size: 35rpx;
        color: #1D1D1D;
    }
}

.list {
    background: #FFFFFF;
    border-radius: 17rpx;
    padding: 35rpx 20rpx;

    .item {
        text {
            &:nth-child(1) {
                font-family: SimHei;
                width: 180rpx;
                font-weight: 600;
                font-size: 30rpx;
            }

            &:nth-child(2) {
                width: calc(100% - 200rpx);
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
            }
        }
    }

    .line {
        height: 2rpx;
        background: #C6C6C6;
        margin: 20rpx 0 25rpx;
    }
}

.text-box {
    height: auto;
    min-height: 273rpx;
    color: #3E3E3E;
    line-height: 48rpx;
    padding: 27rpx 25rpx;
}

.btn {
    margin-top: 60rpx;
    height: 90rpx;
    border-radius: 45rpx;
    color: #fff;
    background: linear-gradient(to top, #015EEA 0%, #00C0FA 100%);
}
</style>